<template>
    <!-- 新增、修改劳务人员信息 -->
  <base-modal
    :title="pageType === 'edit' ? '劳务人员编辑': '劳务人员添加'"
    cancelText="取消"
    okText="保存"
    :width="800"
    v-on="$listeners"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <a-form :form="formInfo">
      <!-- 第一行（所属分公司、所属项目） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="所属分公司"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择分公司" v-decorator="['companyName']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="所属项目"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择项目" v-decorator="['projectName']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <!-- 第二行（分包商、姓名） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="分包商"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择分包商" v-decorator="['subBusiness']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="姓名"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <BaseInput placeholder="请输入姓名" v-decorator="['personName']"/>
          </a-form-item>
        </a-col>
      </a-row>
      <!-- 第三行（班组、工种） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="班组"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择班组" v-decorator="['groupName']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="工种"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择工种" v-decorator="['workType']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <!-- 第四行（性别、联系点划） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="性别"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择性别" v-decorator="['sex']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="联系电话"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <BaseInput placeholder="请输入联系点划" v-decorator="['phone']"/>
          </a-form-item>
        </a-col>
      </a-row>
      <!-- 第五行（身份证号码、是否为特种作业人员） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="身份证号码"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <BaseInput placeholder="请输入身份证号码" v-decorator="['idCard']"/>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="是否为特种作业人员"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择" v-decorator="['isSpecial']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <!-- 第六行（出生日期、是否可用） -->
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="出生日期"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-date-picker v-decorator="['bornDate']" />
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="是否可用"
            :labelCol="{lg: {span: 6}, sm: {span:6}}"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select placeholder="请选择" v-decorator="['isUseful']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </base-modal>
</template>

<script>
import BaseModal from '@/components/BaseModal'
export default {
    name:'a'+Date.now(),  components: {
    BaseModal,
  },
  data() {
    return {
      pageType: 'add',
      formInfo: this.$form.createForm(this, { name: 'updateForm' }),
    }
  },
  methods: {
      handleCancel() {
          this.$emit('cancel')
      },
      handleOk() {
          this.$emit('ok')
      }
  }
}
</script>

<style>
</style>